﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PowersourceUIToolkit;
using UCL.Powersource;
using UCL.Powersource.Analysis;
using UCL.Powersource.TFS;
using UCL.Powersource.Mock;

namespace Powersource_UnitTests.StatisticsTest
{
    internal class MockTfsTeamProjectCollConfig : DummyTeamProjectCollectionConfiguration
    {
        public MockTfsTeamProjectCollConfig()
        {
            

            _ProjectCollectionTimeFrames = new List<ITimeFrame>();

            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Sprint2", IterationPath = "Release 1\\Sprint 2", FinishDate = new DateTime(2012, 5, 4), StartDate = new DateTime(2012, 4, 27) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Sprint3", IterationPath = "Release 1\\Sprint 3", FinishDate = new DateTime(2012, 5, 18), StartDate = new DateTime(2012, 4, 27) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Sprint2LateDate", IterationPath = "Release 1\\Sprint 2", FinishDate = new DateTime(2012, 5, 18), StartDate = new DateTime(2012, 4, 27) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Sprint3EarlyDate", IterationPath = "Release 1\\Sprint 3", FinishDate = new DateTime(2012, 5, 14), StartDate = new DateTime(2012, 4, 27) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "InvalidIterationPath", IterationPath = "Release 1\\Sprint 8", FinishDate = new DateTime(2012, 5, 14), StartDate = new DateTime(2012, 4, 27) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Sprint1", IterationPath = "Release 1\\Sprint 1", FinishDate = new DateTime(2012, 4, 20), StartDate = new DateTime(2012, 4, 9) });


            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "PowersourceSprint1", IterationPath = "Release 1\\Sprint 1", FinishDate = new DateTime(2012, 7, 21), StartDate = new DateTime(2012, 4, 27) });
         //   _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "Team1Sprint1", IterationPath = "Release 1\\Sprint 1", FinishDate = new DateTime(2011, 10, 14) });
            _ProjectCollectionTimeFrames.Add(new TimeFrameIteration() { Label = "NullDates", IterationPath = "Release 1\\Sprint 1", FinishDate = new DateTime(2012, 4, 20), StartDate = null });


            TeamProjectConfigurations = new List<ITfsTeamProjectConfiguration>();
            TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("FabrikamFiber", 1, this) { IsChosen = true });

            TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("Powersource", 1, this) { IsChosen = true });
            TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("Team2", 2, this) { IsChosen = true });
            TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("Team3", 3, this) { IsChosen = true });
            TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("Team4", 4, this) { IsChosen = true });
            //TeamProjectConfigurations.Add(new TfsTeamProjectConfiguration("TestProjectTeam5", 5, this));

            IldasmPath = "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.0A\\bin\\NETFX 4.0 Tools\\ildasm.exe";
            LocalDropBasePath = "C:\\PowersourceBuild";
            CodeIndexDBServer = @"(localdb)\v11.0";
            Name = "FabrikamFiberCollection";
            TfsTeamProjectCollection = new DummyTfsTeamProjectCollection(new Uri("http://81.2.210.131:8080/tfs/FabrikamFiberCollection"));
        }

    }
}
